Microblogging.addView(1, App.views.MESSAGE_MANAGER, 'messagemanager');
Ext.ns('Microblogging.view');
Microblogging.view.MessageManager = Ext.extend(Ext.Panel, {
	layout : 'card',
	initComponent : function() {
		this.manager = new Ext.TabPanel({
			id : 'message',
			tabBar : {
				dock : 'bottom',
				scroll : 'horizontal',
				layout : {
					pack : 'center'
				},
				items : [{
							text : '拟写',
							iconCls : 'compose',
							handler : function() {
								Microblogging.unrealizedMsg();
							}
						}, {
							text : '更多',
							iconCls : 'more',
							handler : function() {
								if (!this.more) {
									this.more = new Microblogging.MenuSheet({
										defaults:{
											scope:this										
										},
										items : [{
													iconCls : 'user',
													text : '用户管理',
													handler : function() {
														this.more.hide();
														Ext.redirect('user');
													}
												}, {
													iconCls : 'bookmarks',
													text : '随便看看',
													handler : function() {
														this.more.hide();
														Ext.redirect('public');
													}
												}, {
													iconCls : 'team',
													text : '热门推荐',
													handler : function() {
														this.more.hide();
														Microblogging.unrealizedMsg();
													}
												}, {
													iconCls : 'search',
													text : '搜索',
													handler : function() {
														this.more.hide();
														Microblogging.unrealizedMsg();
													}
												}, {
													iconCls : 'reply',
													text : '取消',
													handler : function() {
														this.more.hide();
													}
												}]
									});
								}
								this.more.show();
							}
						}]
			},
			items : [{
						iconCls : 'home',
						title : '首页',
						xtype : 'timeline',
						id : 'home'
					}]
		});
		// 随便看看
		this.publicTimeline = new Microblogging.view.Timeline({
					title : '随便看看',
					id : 'publicTimeline',
					dockedItems : [{
								xtype : 'toolbar',
								dock : 'bottom',
								ui : 'dark',
								layout : {
									pack : 'center'
								},
								items : [{
											iconCls : 'home',
											text : 'tdddWest'
										}]
							}]
				});
		Ext.apply(this, {
					items : [this.manager, this.publicTimeline]
				});
		Microblogging.view.MessageManager.superclass.initComponent.apply(this,
				arguments);
	},
	destroy : function() {
		Microblogging.view.MessageManager.superclass.destroy.apply(this, arguments);
		Ext.destroy(this.manager,this.publicTimeline);
	}
});
Ext.reg('messagemanager', Microblogging.view.MessageManager);